(()=>{
    //接口是对对象的属性和行为的描述的抽象
    console.log("1111111")
    interface Iperson{
        readonly id:number, //只读
        name:string,
        age:number,
        sex?:string // 可以没有
    }

    const person:Iperson = {
        id:1,
        name:"小微",
        age:18,
        sex:"男"
    }
    console.log(person)
   
    interface sourcea{
        (source:string,subSource:string):boolean
    }
    const a:sourcea=function getSource(source:string,subSource:string):boolean{
        return source.indexOf(subSource) >-1;
    }
    console.log(a("sss","ss"))

})()